package com.example.pathtracker.net

import com.example.pathtracker.bean.MapPoint
import com.example.pathtracker.bean.PathData
import com.example.pathtracker.bean.PathTypeData
import com.example.pathtracker.bean.Point
import com.example.pathtracker.bean.PointTypeData
import com.example.pathtracker.bean.UploadResponse
import com.google.gson.annotations.Until
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST

interface ApiService {


    @POST("pathType/list")
    fun getAllPathType(): Call<UploadResponse<List<PathTypeData>>>

    @POST("path/add")
    fun uploadPath(@Body pathData: PathData): Call<UploadResponse<Unit>>

    @POST("path/list")
    fun getAllPaths(): Call<UploadResponse<List<PathData>>>

   

//     @GET("getAllPoints")
//    fun getAllPoints(): Call<UploadResponse<List<MapPoint>>>


    @POST("pointType/list")
    fun getAllPointType(): Call<UploadResponse<List<PointTypeData>>>


    // 获取所有点位信息 point/list
    @POST("point/list")
    fun getAllPoints(): Call<UploadResponse<List<MapPoint>>>

// 新增点位 point/add
    @POST("point/add")
    fun addPoint(@Body point: MapPoint): Call<UploadResponse<Unit>>

    // 删除点位 point/delete
    @DELETE("point/{id}")
    fun deletePoint(@retrofit2.http.Path("id") id: Long): Call<UploadResponse<Unit>>

} 